<?php
$names = array("alex", "billy", "Dale");

foreach($names as $index => $name) {
    #echo $index, '. ', $name, "<br>";
    echo $index + 1, '. ', $name;
    if($index !== count( $names )){
        echo "<br>";
    }
}
